package org.example.lotterysystem.service;

import org.example.lotterysystem.controller.param.DrawPrizeParam;
import org.example.lotterysystem.controller.param.ShowWinningRecordsParam;
import org.example.lotterysystem.dao.dataobject.WinningRecordDO;
import org.example.lotterysystem.service.dto.WinningRecordDTO;

import javax.validation.constraints.NotNull;
import java.util.List;

public interface DrawPrizeService {

    /**
     * 异步抽奖接口
     * @param param
     */
    void drawPrize(DrawPrizeParam param);

    /**
     * 校验抽奖请求
     *
     * @param param
     * @return
     */
    Boolean checkDrawPrizeParam(DrawPrizeParam param);

    /**
     * 保存 中奖者名单
     * @param param
     * @return
     */
    List<WinningRecordDO> saveWinnerRecords(DrawPrizeParam param);

    /**
     * 删除活动奖品下的中奖者
     *
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(@NotNull(message = "活动id不能为空") Long activityId, @NotNull(message = "奖品id不能为空") Long prizeId);

    /**
     *  获取中奖记录
     *
     * @param param
     * @return
     */
    List<WinningRecordDTO> getRecords(ShowWinningRecordsParam param);
}
